package dao;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import entity.Paciente;

public class PacienteDAO extends BaseDAO{

	public PacienteDAO() {
		super(Paciente.class);
	}

	public Paciente findByNome(String nome){
		Criteria criteria = this.createCriteria();
		criteria.add(Restrictions.like("nome", nome));
		return (Paciente) criteria.uniqueResult();
	}
}
